package infostroy.bookagolf.components.panels;

import infostroy.bookagolf.common.Constants.Icons;
import infostroy.bookagolf.common.helpers.ImageHelper;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.RoundRectangle2D;

/**
 * Created by valer_000 on 1/23/14.
 */
public class RoundedJFrame extends JFrame {

    public RoundedJFrame(Dimension dimension, String title) {
        super(title);
        this.setUndecorated(true);
        this.setShape(new RoundRectangle2D.Double(0,0,dimension.getWidth(),dimension.getHeight(),20,40));
        this.setSize(dimension);
        this.setIconImage(ImageHelper.getInstance().loadImage(Icons.TRAY_LOGO));
    }
}
